Revision: arnesi--dev--1.2--patch-42
Archive: bese-2004@common-lisp.net
Creator: Marco Baringer <mb@bese.it>
Date: Wed Jan 26 22:09:27 CET 2005
Standard-date: 2005-01-26 21:09:27 GMT
Modified-files: src/cps.lisp
New-patches: bese-2004@common-lisp.net/arnesi--dev--1.2--patch-42
Summary: Register the CPS'ness of functions at macro expansion time (Patch by: Antonio Menezes Leitao)
Keywords: 

This patch causes symbols to be registered as naming a CPS function when
they are macro expanded and at run time. Previously cps functions were
only registered at run time, this caused problems when defining cps
functions which called each other in the same file.

The code was also changed in an attempt to improve the error messages.

* src/cps.lisp (*non-cps-calls*): new variable. used to hold a list of
  functions which were compiled as direct functions during to-cps.
  (add-non-cc): register a symbol as naming a non CC function.
  (assert-non-cc): register a list of symbols as naming non CC functions.
  (assert-cc): register a symbol as naming a CC function.
  (gen-cc-definiton): generate a method or function in CPS style.
  (defun/cc): use gen-cc-definiton.
  (defmethod/cc): use gen-cc-definition.
  (handler.transformer 'application): if the function isn't local and
  isn't already registered as a cc function then register it as a non cc
  function.

